<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="">{$type.name}列表</a></li>
		</ul>
		<form class="well form-search" method="post" id="cid-form">
			时间：
			<input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">-
			<input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
			关键字：
			<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword|default=''}" placeholder="请输入关键字...">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="">清空</a>
			<input type="hidden" name="type_id" value="{$type.id}">
		</form>


		<form class="js-ajax-form" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('status',array('status'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('status',array('status'=>0))}" data-subcheck="true">{:L('HIDDEN')}</button>
				<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('delete')}" data-subcheck="true" data-msg="你确定删除吗？">{:L('DELETE')}</button>
			</div>
			<php> $status=array("1"=>L('DISPLAY'),"0"=>L('HIDDEN')); </php>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="30">ID</th>
						<th width="100">标题</th>
						<th width="200">内容</th>
						<th width="120">发表时间</th>
						<th width="50">查看内容</th>
						<th width="100">{:L('STATUS')}</th>
						<th width="150">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<foreach name="data" item="vo">
				<tr>
					<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}"></td>
					<td>{$vo.id}</td>
					<td>{$vo.title}</td>
					<td>{$vo.content}</td>
					<td>{$vo.create_time}</td>
					<td>
						<a href="{:U('pageShow',array('id'=>$vo['id']))}" target="_blank">查看内容</a>
					</td>
					<td>
						<notempty name="vo.status">
							<a data-toggle="tooltip" title="已显示"><i class="fa fa-eye fa-2x"></i></a>
							<else/>
							<a data-toggle="tooltip" title="未显示"><i class="fa fa-eye-slash fa-2x"></i></a>
						</notempty>
					</td>
					<td>
						<if condition="empty($vo['status']) eq 1">
							<a href="{:U('status',array('ids'=>$vo['id'],'status'=>1))}" class="js-ajax-dialog-btn" data-msg="确定显示此帖子吗？">{:L('DISPLAY')}</a>
						<else /> 
							<a href="{:U('status',array('ids'=>$vo['id'],'status'=>0))}" class="js-ajax-dialog-btn" data-msg="确定隐藏此帖子吗？">{:L('HIDE')}</a>
						</if>
						<a href="{:U('delete',array('ids'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
				<tfoot>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="30">ID</th>
						<th width="100">标题</th>
						<th width="200">内容</th>
						<th width="120">发表时间</th>
						<th width="50">查看内容</th>
						<th width="100">{:L('STATUS')}</th>
						<th width="150">{:L('ACTIONS')}</th>
					</tr>
				</tfoot>
			</table>
			<div class="pagination">{$page}</div>
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('status',array('status'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('status',array('status'=>0))}" data-subcheck="true">{:L('HIDDEN')}</button>
				<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('delete')}" data-subcheck="true" data-msg="你确定删除吗？">{:L('DELETE')}</button>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
        (function(){
            $("#istop").val("<?=$formget['istop']?>");
        })();
	</script>
</body>
</html>